package com.hs.android.fortress.intro;

import com.hs.android.fortress.R;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainMenuFragment extends Fragment{

	private static final String TAG = MainMenuFragment.class.getSimpleName();
	
	private onMenuBtnClickListener mMenuBtnListener;
	
	private Button mPlayBtn;
	private Button mSettingBtn;
	private Button mRecordBtn;
	
	public void setMenuBtnListener(onMenuBtnClickListener menuBtnListener) {
		mMenuBtnListener = menuBtnListener;
	}
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		View v = inflater.inflate(R.layout.fragment_menu_main, container, false);
		
		mPlayBtn = (Button)v.findViewById(R.id.btn_play);
		mPlayBtn.setOnClickListener(mListener);
		mSettingBtn = (Button)v.findViewById(R.id.btn_setting);
		mSettingBtn.setOnClickListener(mListener);
		mRecordBtn = (Button)v.findViewById(R.id.btn_record);
		mRecordBtn.setOnClickListener(mListener);
		
		return v;
	}

	private OnClickListener mListener = new OnClickListener() {
		
		@Override
		public void onClick(View v) {
			mMenuBtnListener.onClick(v);
		}
	};
}
